package com.mt.roll.empty.params;

import com.mt.roll.core.base.BaseParam;
import com.mt.roll.core.validator.groups.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author jiff
 * @date 2020/12/22
 * @since 1.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "xx参数对象", description = "用于新增和更新xx信息")
public class EmptyParam extends BaseParam {

    private static final long serialVersionUID = 1L;

    /**
     * 主键，自增
     */
    @ApiModelProperty(value = "主键，更新时需要填写", example = "1")
    @NotNull(message = "xxID不能为空", groups = {UpdateGroup.class})
    private Long id;

    /**
     * xx名称
     */
    @ApiModelProperty(value = "xx名称", required = true, example = "xx管理")
    @NotBlank(message = "xx名称不能为空")
    private String name;
}
